3.3.49 \(\int \frac {(c+d x)^2}{(a+b x)^2} \, dx\)

Optimal. Leaf size=51 \[ -\frac {(b c-a d)^2}{b^3 (a+b x)}+\frac {2 d (b c-a d) \log (a+b x)}{b^3}+\frac {d^2 x}{b^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {43} \begin {gather*} -\frac {(b c-a d)^2}{b^3 (a+b x)}+\frac {2 d (b c-a d) \log (a+b x)}{b^3}+\frac {d^2 x}{b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x)^2/(a + b*x)^2,x]

[Out]

(d^2*x)/b^2 - (b*c - a*d)^2/(b^3*(a + b*x)) + (2*d*(b*c - a*d)*Log[a + b*x])/b^3

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin {align*} \int \frac {(c+d x)^2}{(a+b x)^2} \, dx &=\int \left (\frac {d^2}{b^2}+\frac {(b c-a d)^2}{b^2 (a+b x)^2}+\frac {2 d (b c-a d)}{b^2 (a+b x)}\right ) \, dx\\ &=\frac {d^2 x}{b^2}-\frac {(b c-a d)^2}{b^3 (a+b x)}+\frac {2 d (b c-a d) \log (a+b x)}{b^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 47, normalized size = 0.92 \begin {gather*} \frac {-\frac {(b c-a d)^2}{a+b x}+2 d (b c-a d) \log (a+b x)+b d^2 x}{b^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)^2/(a + b*x)^2,x]

[Out]

(b*d^2*x - (b*c - a*d)^2/(a + b*x) + 2*d*(b*c - a*d)*Log[a + b*x])/b^3

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(c+d x)^2}{(a+b x)^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(c + d*x)^2/(a + b*x)^2,x]

[Out]

IntegrateAlgebraic[(c + d*x)^2/(a + b*x)^2, x]

________________________________________________________________________________________

fricas [A]  time = 0.59, size = 92, normalized size = 1.80 \begin {gather*} \frac {b^{2} d^{2} x^{2} + a b d^{2} x - b^{2} c^{2} + 2 \, a b c d - a^{2} d^{2} + 2 \, {\left (a b c d - a^{2} d^{2} + {\left (b^{2} c d - a b d^{2}\right )} x\right )} \log \left (b x + a\right )}{b^{4} x + a b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^2/(b*x+a)^2,x, algorithm="fricas")

[Out]

(b^2*d^2*x^2 + a*b*d^2*x - b^2*c^2 + 2*a*b*c*d - a^2*d^2 + 2*(a*b*c*d - a^2*d^2 + (b^2*c*d - a*b*d^2)*x)*log(b
*x + a))/(b^4*x + a*b^3)

________________________________________________________________________________________

giac [A]  time = 0.96, size = 98, normalized size = 1.92 \begin {gather*} \frac {{\left (b x + a\right )} d^{2}}{b^{3}} - \frac {2 \, {\left (b c d - a d^{2}\right )} \log \left (\frac {{\left | b x + a \right |}}{{\left (b x + a\right )}^{2} {\left | b \right |}}\right )}{b^{3}} - \frac {\frac {b^{3} c^{2}}{b x + a} - \frac {2 \, a b^{2} c d}{b x + a} + \frac {a^{2} b d^{2}}{b x + a}}{b^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^2/(b*x+a)^2,x, algorithm="giac")

[Out]

(b*x + a)*d^2/b^3 - 2*(b*c*d - a*d^2)*log(abs(b*x + a)/((b*x + a)^2*abs(b)))/b^3 - (b^3*c^2/(b*x + a) - 2*a*b^
2*c*d/(b*x + a) + a^2*b*d^2/(b*x + a))/b^4

________________________________________________________________________________________

maple [A]  time = 0.01, size = 86, normalized size = 1.69 \begin {gather*} -\frac {a^{2} d^{2}}{\left (b x +a \right ) b^{3}}+\frac {2 a c d}{\left (b x +a \right ) b^{2}}-\frac {2 a \,d^{2} \ln \left (b x +a \right )}{b^{3}}-\frac {c^{2}}{\left (b x +a \right ) b}+\frac {2 c d \ln \left (b x +a \right )}{b^{2}}+\frac {d^{2} x}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)^2/(b*x+a)^2,x)

[Out]

1/b^2*d^2*x-2/b^3*d^2*ln(b*x+a)*a+2/b^2*d*ln(b*x+a)*c-1/b^3/(b*x+a)*a^2*d^2+2/b^2/(b*x+a)*a*c*d-1/b/(b*x+a)*c^
2

________________________________________________________________________________________

maxima [A]  time = 1.01, size = 67, normalized size = 1.31 \begin {gather*} \frac {d^{2} x}{b^{2}} - \frac {b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}}{b^{4} x + a b^{3}} + \frac {2 \, {\left (b c d - a d^{2}\right )} \log \left (b x + a\right )}{b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^2/(b*x+a)^2,x, algorithm="maxima")

[Out]

d^2*x/b^2 - (b^2*c^2 - 2*a*b*c*d + a^2*d^2)/(b^4*x + a*b^3) + 2*(b*c*d - a*d^2)*log(b*x + a)/b^3

________________________________________________________________________________________

mupad [B]  time = 0.36, size = 71, normalized size = 1.39 \begin {gather*} \frac {d^2\,x}{b^2}-\frac {a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2}{b\,\left (x\,b^3+a\,b^2\right )}-\frac {\ln \left (a+b\,x\right )\,\left (2\,a\,d^2-2\,b\,c\,d\right )}{b^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x)^2/(a + b*x)^2,x)

[Out]

(d^2*x)/b^2 - (a^2*d^2 + b^2*c^2 - 2*a*b*c*d)/(b*(a*b^2 + b^3*x)) - (log(a + b*x)*(2*a*d^2 - 2*b*c*d))/b^3

________________________________________________________________________________________

sympy [A]  time = 0.63, size = 60, normalized size = 1.18 \begin {gather*} \frac {- a^{2} d^{2} + 2 a b c d - b^{2} c^{2}}{a b^{3} + b^{4} x} + \frac {d^{2} x}{b^{2}} - \frac {2 d \left (a d - b c\right ) \log {\left (a + b x \right )}}{b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)**2/(b*x+a)**2,x)

[Out]

(-a**2*d**2 + 2*a*b*c*d - b**2*c**2)/(a*b**3 + b**4*x) + d**2*x/b**2 - 2*d*(a*d - b*c)*log(a + b*x)/b**3

________________________________________________________________________________________